<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>fragment_test</title>
</head>

<body>

<h3>insert引用:插入到span的内部 可以根据name引入 也可以根据id引入</h3>
根据name引入:<span th:insert="common::fragment-name1"></span><br/>
根据id引入:<span th:insert="common::#fragment-id1"></span>

<h3>replace引用:将外部的span给替换掉了</h3>
根据name引入:<span th:replace="common::fragment-name1"></span><br/>
根据id引入:<span th:replace="common::#fragment-id1"></span>

<h3>include引用:外部span保留  将common里面的内部内容给保留</h3>
根据name引入:<span th:include="common::fragment-name1"></span><br/>
根据id引入:<span th:include="common::#fragment-id1"></span>

<h3>传递参数</h3>

传递参数:<span th:include="common::#fragment-id2(userName='张三',password=${password})"></span>
</body>

</html>